package com.study.service.impl.rabbit.topic.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/5/11 8:47 下午
 */

@Component
public class MessageListener {

    @RabbitListener(queues = "topic_queue")
    public void receive(String id) {
        System.out.println("rabit mq topic 1 消费短信 id: " + id);
    }

    @RabbitListener(queues = "topic_queue2")
    public void receive2(String id) {
        System.out.println("rabit mq topic 2222 消费短信 id: " + id);
    }
}
